23] Disco ball effect: how simulate some sort of radiosity.
Alan Gordie:
Last night I was trying to do a disco ball effect, you know like saturday night fever:)
I made a primitive sphere and scaled and rotated selected points to make angular patches on the sphere
then made it reflective 90% and put it inside of a box (extruded plane) then aimed two lights from 2 angles.
Ok so far, but...
...when I render, I can see the reflection of the light on the wall in the sphere, but the light shining off
the sphere is not hitting any of the walls...argh
Is this something which Imagine cannot do or am I doing something wrong?
Curcio Nicholas:
No raytracer (that I know of) can do this. To reflect lights you need a radiosity raytracer. These aren't
too common and take forever to render scenes.
What you could do is make some sort of transparency map (or use the transpar.itx texture
with something else as I did with the underwater lighting) and put a light source inside the disco ball
so that the light shines out from the ball.
Goldman:
Actually, it's something ray-tracers in general can't do. Scenes are rendered opposite to convention.
That is, a ray is traced from the camera to a light, not from the light to the camera. Therefore, light
reflecting off of objects, bouncing, and in turn hitting other objects is not possible.
A technique exists, called Radiosity, that attempts to simulate "real-wo rld" light ing effects.
Unfortunately, Imagine (as well as the majority of commercial software on the market) does not have
this rendering capability. It's just as well since the process is extremely processor intensive (read:
takes a loooong amount of time), though the results can be stunning..
Since 3D visualization is just a simulation anyway, you can fake the effects with several well placed
lights or textures.
I suppose you could make an inner sphere with lots of holes in it. Stick a point lightsource in this
and have the whole thing rotate. It wouldn't be the best method (points of light would be sharp), but
it would do.
Anyone know what would happen if you made a sphere totally transparent, but totally reflective? Would
a lightsource (with shadows enabled) pass through it? Would the object look like glass from the outside
(because of the high reflectancy) at the same time? If so, then take your orignal sphere object, give it
255, 255, 255 filter, and 255, 255, 255 reflect values. Hopefully, the inner sphere will act as a gobo/cookie
thing while the outer sphere gives the impression of the disco-ball glass.
Craigh:
Sorry, ray tracing doesn't work that way (usually)...You need radiosity. The portion of the wall will
check to see if lights are pointed at it when it is being shaded, but will NOT check to see if REFLECTED
light is impinging upon it.
One way to do this:
Use Scanline rendering (or ray-tracing, but make sure the new lights are outside the disco ball if using
ray-tracing). Set up a cluster of multi-colored blinking spotlights inside the disco ball that rotate with
it and point outward.
The original lights will illuminate the disco ball and the new lights will illuminate the wall with the
spinning/blinking effect seen in your favorite disco-theque! This will also allow you to use a nice lens
flare since the new spinning spot-lights will occasionally point directly at the camera!
Randy R. Wall:
No Imagine won't bounce light off of objects (yet). But you could probably make a good fake for it using a
Sphere with the RadWind and Transpar textures. And an axis set to a point source light inside of the sphere.
I haven't tried this but am sure with some work it would shoot little squares all over your walls as you
rotate your disco ball. One problem I can think of is you may not be able to have the nice reflective look
that the object you have already tried. But then with the correct setting it might be possible. Maybe the
metal texture set to chrome on the sphere as well might help?
I'm only gueussing with all of this but do believe the Transpar texture will be the key to success.
Randy R. Wall:
Well, sense I had nothing else to do I thought I'd give a quick try at that Disco Ball and see
if what I thought would work would.
I think it works pretty nice, but there were a few things I did not try sense I wanted to
post something for you before I hit the sack.
Anyways, heres what I did for a fairly simple Disco Ball, but one that still looks and works nice.
- Add a Sphere
- Load the Chrome Attribute
- Add the RadWind texture and set it to:
Radial Scale | -1.0 | Color 1 R | 255.0 |
Z Scaling | 3.0 | Color 1 G | 0.0 |
Sweep Division | 20.0 | Color 1 B | 0.0 |
Fraction 'On' | 1.0 | Color 2 R | 255.0 |
Dist Travelled | 0.0 | Color 2 G | 255.0 |
Min Spacing | 0.4 | Color 2 B | 255.0 |
Max Spacing | 0.4 | Reflect Adj | 1.0 |
Transparancy | 0.0 | | |
The colors can be changed to what you like, but its a good idea to have one a darker color so that when the
Transpar texure lights the walls with the little squares some of them will be darker than others..
It maybe a good idea if you are going to have a couple of colored lights hitting the Disco Ball to use a
grey color like 100,100,100 for the dark color and 255, 255, 255 for the lighter color.
Anyways on to the rest of the Disco Ball.
- Now Add the Transpar texture and leave it at the defaults
- Now Add an Axis to the center of the ball and set it to a Point Source Light and Cast Shodows.
Now your ready to render it.. If you don't have a lot of things to reflect or lots of glass objects you
maybe able to speed things up by setting the RSDP in prefs to 2. If you do have a lot of things to render
than set it to what need be. But if you want to test out the Disco ball so you can set it up how YOU like
it then I would recomend putting it in a box with an open end for viewing and set RSDP to 2. This should work
fine for these test.
The only thing I found I didn't like about it is the squares are all the same distance apart,
but the dark and light colors help break this up a bit as well as having the windows Min & Max Spacing
fairly large. You could make these smaller to make the Ball look a bit better but I didn't like the sqaures
on the walls so close together when I did this. But then I was testing it in a fairly small box.. I think in
a larger box it might look quite good. Especially if there were other things in the room for the squares to
interact with.. Anyways something for you to play with..
Well I hope you like the looks of it. I tried the Mosaic texture on it and that looked pretty cool too,
but not quite right. I think these Disc Ball actually have many different shapes on them so the produce
different shapes on the ground. But the Mosaic texture was a bit to much. I was going to try a combination
of a couple of texture, but thought it would take a while to play around with this and really only wanted
to see how my suggestion would work sense I was only guessing about it. And sense it did work I figured I'll
leave the playing around with the textures for you..
![owl-bar](Owl_bar.gif)
Pages made from the amigaguide version with the help of Mike's
RDAG2HTML
and the fabulous Dietmar's GoldED with the
WWW extension v2.